home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Developer / Eval / Source / EvalWrap.psw < prev    next >
Text File  |  1992-05-12  |  570b  |  23 lines

  1. /**
  2.  ** code for setting up an independent context,
  3.  ** borrowed from YAP
  4.  **/
  5.  
  6. defineps GetFocus(|float *llx; float *lly, *urx, *ury, ctm[6]; int *win)
  7.     gsave clippath pathbbox ury urx lly llx grestore
  8.     matrix currentmatrix {ctm} forall
  9.     currentwindow win
  10. endps
  11.  
  12. defineps ReFocus(int win; float ctm[6]; float llx, lly, urx, ury)
  13.     win windowdeviceround    % focus on this window
  14.     ctm setmatrix        % set up the matrix
  15.     newpath            % reestablish the clip path
  16.     llx lly moveto
  17.     llx ury lineto
  18.     urx ury lineto
  19.     urx lly lineto
  20.     closepath clip
  21.     newpath
  22. endps
  23.